<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>留言板系统 - 登录</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css">
    <style>
        .login-container {
            max-width: 400px;
            margin: 100px auto;
            padding: 20px;
            border: 1px solid #ddd;
            border-radius: 5px;
            box-shadow: 0 0 10px rgba(0,0,0,0.1);
        }
    </style>
</head>
<body>
<div class="container">
    <div class="login-container">
        <h2 class="text-center mb-4">留言板系统登录</h2>
        <form th:action="@{/login}" method="post">
            <div th:if="${error}" class="alert alert-danger" th:text="${error}"></div>

            <div class="mb-3">
                <label for="studentId" class="form-label">学号</label>
                <input type="text" class="form-control" id="studentId" name="studentId" required>
            </div>

            <div class="mb-3">
                <label for="studentPwd" class="form-label">密码</label>
                <input type="password" class="form-control" id="studentPwd" name="studentPwd" required>
            </div>

            <button type="submit" class="btn btn-primary w-100">登录</button>
        </form>
    </div>
</div>
</body>
</html>